<div id="tabs">
	<ul>
        <li  id="current"><?php echo $this->Html->link(__('Danh sách loại kênh', true), array('controller' => 'loaikenhs', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('Thêm loại kênh', true), array('controller'=>'loaikenhs','action' => 'add')); ?></li>
	</ul>
</div>
<div class="loaikenhs index">
	<h2><?php __('Danh sách loại kênh');?></h2>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo $this->Paginator->sort('STT');?></th>
			<th><?php echo $this->Paginator->sort('Tên loại kênh','loaiskenh.loaikenh');?></th>
			<th class="actions"><?php __('Lựa chọn');?></th>
	</tr>
	<?php
	$i = 0;$stt=0;
	foreach ($loaikenhs as $loaikenh):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $stt=$stt+1; ?>&nbsp;</td>
		<td><?php echo $loaikenh['Loaikenh']['loaikenh']; ?>&nbsp;</td>
		<td class="actions">
			<?php
				if (substr($donvi[key($donvi)],0,2)=='TT')
				{ 
					echo $this->Html->link(__('Xem các kênh bán', true), array('controller'=>'kenhs','index' => 'view',$loaikenh['Loaikenh']['id'] ));
				}
			?>
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'edit', $loaikenh['Loaikenh']['id']));?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $loaikenh['Loaikenh']['id']), null, sprintf(__('Bạn muốn xóa loại kênh %s?', true), $loaikenh['Loaikenh']['id']));?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
